    <ul class="posts">
        {% for post in posts %}
        <li class="post">
          <div class="post-content">
            <div class="profile-thumbnail">
                <a href="{{ url_for('.user', username=post.author.username) }}">
                    <img class="img-rounded profile-thumbnail"
                         src="{{ post.author.gravatar(size=40) }}">
                </a>
            </div>
            <div class="post-date">{{ moment(post.timestamp).fromNow() }}</div>
            <div class="post-author">
                <a href="{{ url_for('.user', username=post.author.username) }}">
                    {{ post.author.username }}
                </a>
            </div>
            <div class="post-body">{{ post.body }}</div>
             <div class="post-footer">
                 {% if current_user ==post.author %}
                  <a href="{{ url_for('.edit', id=post.id) }}">
                      <span class="label label-default">Edit</span></a>
                 {% elif current_user.is_administrator()  %}
                     <a href="{{ url_for('.edit', id=post.id) }}">
                         <span class="label label-default">Edit[Admin]</span>
                     </a>
                 {% endif %}
                 <a href="{{ url_for('.post', id=post.id) }}">
                         <span class="label label-default">Permalink</span>
                 </a>
             </div>
          </div>
        </li>
        {% endfor %}
    </ul>
